﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            return View();
        }
        public JavaScriptResult ShowWarning()
        {
            return JavaScript("ShowWarning()");
        }

        public JavaScriptResult ShowWarningString()
        {
            return JavaScript("ShowWarningString('" + Server.HtmlEncode(Request.Form["txt"]) + "')");
        }

        public ActionResult Dynamic()
        {
            return View();
        }
        public ActionResult TwoSubmit()
        {
            return View();
        }
        [HttpPost]
        public ActionResult TwoSubmit(string submitButton)
        {
            ViewData["submit"] = submitButton;
            return View();
        }
    }
}
